package com.atguigu.ssyx.acl.service;

import com.atguigu.ssyx.model.acl.AdminRole;
import com.atguigu.ssyx.model.acl.Role;
import com.atguigu.ssyx.vo.acl.RoleQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * Created on 2023/6/27
 */
public interface RoleService extends IService<Role>  {

    //根据条件查询分页
    IPage<Role> selectPageVo(Page<Role> pageParm, RoleQueryVo roleQueryVo);

    /**
     * 获取用户角色
     * @param adminId
     * @return
     */
    Map<String,Object> toAssignByAdminId(Long adminId);

    /**
     * 为用户分配角色
     * @param adminId 用户Id
     * @param roleId 用户分配的角色ID
     * @return
     */
    List<AdminRole> adminToRole(Long adminId, Long[] roleId);
}
